import request from '@/utils/request'
import { renderUrl } from '../../utils'

const headers = {
  'Content-Type': 'application/json'
}

export function add(data) {
  return request({
    url: '/admin/manager/add',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function del(data) {
  return request({
    url: '/admin/manager/delete',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function edit(data) {
  return request({
    url: '/admin/manager/update',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function toDisableAndOpen(data) {
  return request({
    url: '/admin/role/updRoleStatus',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export default { add, edit, del }

